/*
 * @(#)StartSimulation.java			0.1 21/11/2010
 * Copyright (C) 2010 Grupo de Alunos abaixo
 * 
 * Universidade Federal do ABC
 * Vida Artificial - 3o quadrimestre de 2010
 * Aluno: Abner
 * Aluno: Cláudio Antônio Peanho
 * Aluno: Fabrizio Borelli
 * Aluna: Maitê Balhester
 * Aluno: Rafael Munhoz
 * Professora Dr. Karla Vittori
 * Projeto: Simulação de Colônia de Formigas (antcolonyswarm)
 * 
 * Código baseado em jheatbugs-3.0 de Timothy Howe
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package br.edu.ufabc.va.acs.controller;

import swarm.Globals;
import swarm.objectbase.Swarm;
import swarm.simtoolsgui.GUISwarm;

/**
 * Encapsula a configuração da plataforma Swarm e inicialização da simulação
 * 
 * @author Peanho
 * 
 */
public class StartSimulation {

	/**
	 * Inicializa a simulação com os parâmetros recebidos em {@code args}
	 * 
	 * @param args
	 *            flags de linha de comando <code>-b</code> para batch
	 */
	public static void main(String[] args) {
		// Inicialização da plataforma Swarm
		Globals.env.initSwarm("Ant Colony Simulation", "0.1",
				"antcolonyswarm@googlegroups.com", args);
		
		GUISwarm swarm = new ObserverSwarm(Globals.env.globalZone);
		Globals.env.setWindowGeometryRecordName(swarm, "Ant Colony Simulation");
		swarm.buildObjects();
		swarm.buildActions();
		swarm.activateIn(null);
		swarm.go();
		swarm.drop();
	}

}
